	<div class='weui-cells bc-district' style='margin-top: 10px;'>
		<div class='weui-cell'>
			<div class='weui-cell__hd' style='width: 100px;'>
				单位状态	<unit_id detail=1 class="hidden" id="unit_id"></unit_id>
			</div>
			<status>
				<small mute>
					<editing detail=d >编辑中</editing>

					<applying detail=d>申请中</applying>
					<rejected detail=d>已拒绝</rejected>

					<inviting detail=d>邀请中</inviting>
					<invite_overdue detail=d>邀请过期</invite_overdue>

					<released detail=d>已开放</released>
					<closed detail=d>已关闭</closed>
				</small>
			</status>
			<div class='weui-cell__bd'>
			</div>
			<div class="weui-cell__ft">
				<!-- <applying detail=none><finished detail=none><editing detail=none><closed detail=none><input autocomplete='off' id='editor-brand-highlight' class="weui-switch weui-switch_warn" name='highlight' detail=1 type="checkbox"/></closed></editing></finished></applying> -->
			</div>
		</div>
		<div class='weui-cell'>
			<div class='weui-cell__hd' style='width: 100px;'>
				单位名称
			</div>
			<div class='weui-cell__bd'>
				<input autocomplete='off' class='editor-unit-modify weui-input' detail=1 name='unit_name' placeholder="请输入名称" />
			</div>
			<div class="weui-cell__ft">
				<input autocomplete='off' id='editor-unit-released' class="weui-switch" name='released' detail=1 type="checkbox">
			</div>
		</div>

		<div class='weui-cell' style="height: 39px;">
			<div class='weui-cell__hd' style='width: 100px;'>
				所在省市
			</div>
			<div class='weui-cell__bd'>
				<select autocomplete='off' id='editor-unit-link' class='editor-unit-modify weui-select' detail=1 name='province' />
			</div>
		</div>
		<div class='weui-cell' style="height: 39px;">
			<div class='weui-cell__hd' style='width: 100px;'>
				所在市区
			</div>
			<div class='weui-cell__bd'>
				<select autocomplete='off' id='editor-unit-link' class='editor-unit-modify weui-select' detail=1 name='city' />
			</div>
		</div>
		<div class='weui-cell' style="height: 39px;">
			<div class='weui-cell__hd' style='width: 100px;'>
				所在区县
			</div>
			<div class='weui-cell__bd'>
				<select autocomplete='off' id='editor-unit-link' class='editor-unit-modify weui-select' detail=1 name='district' />
			</div>
		</div>
		<div class='weui-cell' style="height: 39px;">
			<div class='weui-cell__hd' style='width: 100px;'>
				街道地址
			</div>
			<div class='weui-cell__bd'>				
				<input autocomplete='off' id='editor-unit-link' class='editor-unit-modify weui-input' detail=1 name='address' placeholder="街道地址" />
			</div>
		</div>
		<div class='weui-cell' style="height: 39px;">
			<div class='weui-cell__hd' style='width: 100px;'>
				联系方式
			</div>
			<div class='weui-cell__bd'>
				<select autocomplete='off' id='editor-unit-link' class='editor-unit-modify weui-select' detail=1 name='tel' />
			</div>
		</div>
		<div class='weui-cell' style="height: 39px;">
			<div class='weui-cell__hd' style='width: 100px;'>
				官方网站
			</div>
			<div class='weui-cell__bd'>
				<input autocomplete='off' id='editor-unit-link' class='editor-unit-modify weui-input' detail=1 name='homepage' placeholder="http://" />
			</div>
			&nbsp;
			&nbsp;
			<div class='weui-cell__ft'>
				<a class='weui-cell_link' onclick='if(!$("#editor-unit-link").val())return;window.open($("#editor-unit-link").val())'>访问 ></a>
			</div>
		</div>
		<div class="weui-cell" style='min-height: 116px;align-items: flex-start;'>
			<div class="weui-cell__bd">
				<textarea detail=1 class="editor-unit-modify weui-textarea" placeholder="产品简介" name='description' rows="5"></textarea>
				<div class="weui-textarea-counter"><span>0</span>/200</div>
			</div>
		</div>
		{include file='console:network-editor-panel-unit-content-imgs' /}
		<div class="weui-cell">
			<div class="weui-cell__bd">
				产品标签
			</div>
		</div>
		<div class='weui-cell bc-btn-group' data-target='#editor-unit-detail-config-labels'>
			<div class='hidden'><input autocomplete='off' name='labels' detail=1 class='hidden bc-btn-group-value editor-unit-modify' /></div>
			<div style='font-size: 13px;' class='bc-rank bc-btn-group-btns' id='editor-unit-detail-label' data-port-value='CONSOLE.urls.unit_label'>
				<div class='bc-rank-loading'>
					<span class='weui-loading'></span> 加载中....
				</div>
				<span class='bc-rank-template bc-btn-group-btns weui-flex__item product-label-box'>
					<label class='bc-radio-uncheck'>
						<label_id rank=1 class='hidden'></label_id>
						<type rank=1 class='hidden'></type>
						<input autocomplete='off' class='weui-check' type='radio' name='unit-detail-label' value='' />
						<div><label_text rank=1></label_text><br/></div>
					</label>
				</span>
			<!-- <div class='weui-flex bc-rank-template'>
				<div style='margin-top: 11px;width: 60px;'>
					<category_text rank=1></category_text>
				</div>
				<div style='margin-top: 10px;'>
					&nbsp;:&nbsp;
				</div>
				<labels rank=r class='bc-btn-group-btns weui-flex__item product-label-box'>
					<label class='bc-radio-uncheck'>
						<input autocomplete='off' class='weui-check' type='radio' name='__category_text__unit-detail-label' value='__label_id__' />
						<div><label_text range=1></label_text><br/></div>
					</label>
				</labels>
			</div> -->
		</div>
	</div>

	<div class='weui-btn-area'>
		<closed detail=d>
			<a id='unit-release' class='weui-btn weui-btn_primary'>重新开放</a>
		</closed>
		<!--<inviting detail=d>-->
			<!--<a id='unit-invite-cancel' class='weui-btn weui-btn_warn'>撤销邀请</a>-->
		<!--</inviting>-->
		<released detail=d><closed detail=none>
			<a id='unit-close' class='weui-btn weui-btn_warn'>关闭</a>
		</closed></released>
		<!--<editing detail=d>-->
			<!--<input id='unit-invite-email' class='1weui-input' placeholder="填写邮箱地址" />-->
			<!--<a id='unit-invite' class='weui-btn weui-btn_primary'>发送邀请</a>-->
		<!--</editing>-->
		<!--<invite_overdue detail=d>-->
		<!--<input id='unit-reinvite-email' class='1weui-input' placeholder="填写邮箱地址" />-->
		<!--<a id='unit-reinvite' class='weui-btn weui-btn_primary'>重新发送邀请</a>-->
		<!--</invite_overdue>-->
		<applying detail=d>
			<small mute>#<apply_id id='option-brand-detail-apply_id' detail=1></apply_id></small>
			<div class='weui-flex'>
				<div class='weui-flex__item'>
					<a id='unit-apply-approve' class='weui-btn weui-btn_primary'>通过</a>
				</div>
				&nbsp;
				<div class='weui-flex__item'>
					<a id='unit-apply-reject' class='weui-btn weui-btn_warn'>拒绝</a>
					<input id='unit-apply-reject-reason' detail=1 class='weui-btn weui-btn_default weui-btn_mini' placeholder="可以填写拒绝理由" />
				</div>
			</div>
		</applying>
	</div>
	<br/>

</div>
<sss>
	$('#editor-unit-detail-label').on('bc-rank-success' , function(event) {
	$(this).find('input').each(function(index, el) {
	if(index) $(el).val($(el).siblings('label_id').html());
});
});
    POST.init('#unit-invite',{
        method:'click',
        input:function(){
            var unit_id = $('#unit_id').text();
            var email = $('#unit-invite-email').val();
            return {unit_id:unit_id,email:email}
        },
        success:function(){
			LIST.reload('#editor-unit-list');
			LIST.reload('#editor-panel-unit-detail');
        },
        url:'/network/invite'
    })
    POST.init('#unit-apply-approve',{
        method:'click',
        input:function(){
            var unit_id = $('#unit_id').text();
            var authorize = 1;
            return {unit_id:unit_id,authorize:authorize}
        },
        success:function(){
            LIST.reload('#editor-unit-list');
            LIST.reload('#editor-panel-unit-detail');
        },
        url:'/network/apply_handle'
    })
    POST.init('#unit-apply-reject',{
        method:'click',
        input:function(){
            var unit_id = $('#unit_id').text();
            var authorize = 0;
            var reason = $('#unit-apply-reject-reason').val();
            return {unit_id:unit_id,authorize:authorize,reason:reason}
        },
        success:function(){
            LIST.reload('#editor-unit-list');
            LIST.reload('#editor-panel-unit-detail');
        },
        url:'/network/apply_handle'
    })

    POST.init(document,{
        method:'change',
        url:'/unit/release',
        style:'input',
        stop:function(){
            var unit_id = $('#unit_id').text();
            if(!unit_id) return true;
        },
        input:function(e){
            var unit_id = $('#unit_id').text();
            var release = parseInt($(e).prop('checked')*1) || 0;
            return {unit_id:unit_id,release:release}
        },
        success:function(){
            LIST.reload('#editor-unit-list')
        }
    },'#editor-unit-released')
</sss>